<?php
include("../conn.php");

$query = mysql_query("select * from home_activity order by type");
$home_activity = array();
$i=0;
while ($row = mysql_fetch_assoc($query)) {
	$home_activity[$i][id] = $row[id];
	$home_activity[$i][name] = $row[name];
	$home_activity[$i][images] = $row[images];
	$home_activity[$i][type] = $row[type];
	$home_activity[$i][countdown] = strtotime($row[activity_down]);
	$i++;
}
$arr = array('code' => 200, 'msg' =>'查询活动信息成功', 'home_activity' => $home_activity);
echo json_encode($arr);